html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow-x: hidden; /* 防止水平滚动条 */
}

body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
}

/* 顶部灰色导航栏 */
.top-header {
    background-color: #f2f2f2;
    color: #666;
    padding: 5px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
    border-bottom: 1px solid #eee;
}

.top-left,
.top-right {
    display: flex;
    align-items: center;
}

.top-header span {
    margin-right: 15px;
}

.top-header a {
    color: #666;
    text-decoration: none;
    margin-left: 15px;
    white-space: nowrap; /* Prevent text wrapping */
}

.top-header a:hover {
    color: #007bff;
}

/* 下拉菜单样式 */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    color: #666;
    padding: 0;
    font-size: 0.9em;
    border: none;
    cursor: pointer;
    margin-left: 15px;
    text-decoration: none;
}

.dropbtn:hover {
    color: #007bff;
}

.arrow {
    border: solid #666;
    border-width: 0 1px 1px 0;
    display: inline-block;
    padding: 3px;
    margin-left: 5px;
}

.arrow.down {
    transform: rotate(45deg);
    -webkit-transform: rotate(45deg);
}

/* 新增：分类和搜索条容器样式 */
.category-search-bar-container {
    background-color: #f8f8f8; /* 轻微的背景色以区分 */
    border-radius: 0; /* 移除圆角，使其更像长条 */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* 更轻的阴影 */
    padding: 15px 50px; /* 增加左右内边距，保持内部内容与边缘的距离 */
    margin: 0 !important; /* 移除外边距，使其紧贴上方元素 */
    width: 100%; /* 确保全宽 */
    display: flex;
    justify-content: flex-start; /* 分类项和搜索框左对齐 */
    align-items: center;
    box-sizing: border-box; /* 包含padding在内的宽度计算 */
}

/* 调整：分类导航栏样式（现在在 category-search-bar-container 内部，不独立卡片） */
.main-nav {
    background-color: transparent; /* 移除背景 */
    padding: 0; /* 移除内边距 */
    border-radius: 0; /* 移除圆角 */
    box-shadow: none; /* 移除阴影 */
    margin-right: 50px; /* 调整与搜索框的间距 */
    flex-grow: 1; /* 允许其增长占据可用空间 */
    display: flex; /* 内部元素使用flex布局 */
    align-items: center;
    justify-content: flex-start; /* 分类项左对齐 */
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}

.main-nav ul li {
    margin-right: 30px; /* 调整分类项之间的间距 */
    margin-left: 0;
}

.main-nav ul li a {
    color: #333;
    text-decoration: none;
    font-size: 1.1em; /* 稍微增大字体 */
    font-weight: bold;
    padding: 5px 0;
    white-space: nowrap;
}

.main-nav ul li a:hover {
    color: #007bff;
}

/* 调整：搜索框样式（现在在 category-search-bar-container 内部，不独立卡片） */
.header-search {
    background-color: transparent; /* 移除背景 */
    border-radius: 0; /* 移除圆角 */
    box-shadow: none; /* 移除阴影 */
    padding: 0; /* 移除内边距 */
    display: flex;
    align-items: center;
    flex-shrink: 0; /* 不允许缩小 */
}

.header-search input {
    padding: 10px; /* 调整内边距 */
    border: 1px solid #ddd; /* 边框颜色 */
    border-radius: 5px; /* 调整圆角 */
    margin-right: 10px; /* 与按钮的间距 */
    width: 250px; /* 调整宽度 */
    font-size: 1em;
}

.header-search button {
    padding: 10px 20px; /* 调整内边距 */
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px; /* 调整圆角 */
    cursor: pointer;
    font-size: 1em;
}

.header-search button:hover {
    background-color: #0056b3;
}

.main-content {
    padding: 20px;
    max-width: 1200px;
    margin: 20px auto;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.goods-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.goods-item {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.goods-item img {
    max-width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 10px;
}

.goods-item p {
    margin: 5px 0;
    font-size: 0.9em;
}

.goods-item p:first-of-type {
    font-weight: bold;
    font-size: 1.1em;
}

.goods-item a {
    text-decoration: none;
    color: #333;
}

.goods-item button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

.goods-item button:hover {
    background-color: #0056b3;
}

/* 收藏列表表格样式 */
.favorites-table {
    width: 100%;
    border-collapse: separate; /* 使用 separate 以便应用 border-radius */
    border-spacing: 0; /* 移除单元格间距 */
    margin-top: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    overflow: hidden; /* 确保圆角和阴影生效 */
    border: 1px solid #ccc;
}

.favorites-table th,
.favorites-table td {
    border: 1px solid #ddd; /* 单元格边框 */
    padding: 12px 15px;
    text-align: left;
    vertical-align: middle; /* 垂直居中内容 */
}

.favorites-table thead th {
    background-color: #4A90E2; /* 蓝色背景 */
    color: white;
    font-weight: bold;
}

.favorites-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.favorites-table tbody tr:hover {
    background-color: #f1f1f1;
}

.favorite-goods-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.remove-favorite-btn {
    background-color: #dc3545; /* 红色 */
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
}

.remove-favorite-btn:hover {
    background-color: #c82333;
}

.goods-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    padding: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    margin-top: 30px;
    align-items: flex-start; /* 顶部对齐 */
}

.detail-image {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    text-align: center;
}

.detail-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.detail-info {
    flex: 2;
    min-width: 400px;
}

.detail-info h2 {
    color: #333;
    margin-top: 0;
    margin-bottom: 15px;
}

.detail-info p {
    margin-bottom: 10px;
    color: #555;
}

.detail-info p strong {
    color: #333;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9em;
    margin-left: 10px;
}

.current-price {
    color: #dc3545; /* 红色 */
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 20px;
}

.quantity-input {
    width: 60px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-align: center;
    margin-right: 10px;
}

.action-button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    margin-top: 20px;
    margin-right: 10px;
}

.action-button:hover {
    background-color: #0056b3;
}

.favorite-button {
    background-color: #ffc107; /* 橙色 */
    color: #333;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    margin-top: 20px;
}

.favorite-button:hover {
    background-color: #e0a800;
}

.add-to-cart-button {
    background-color: #28a745; /* 绿色 */
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    margin-top: 20px;
}

.add-to-cart-button:hover {
    background-color: #218838;
}

.detail-info form {
    display: flex;
    align-items: center;
    margin-top: 20px;
}

.detail-info form label {
    margin-right: 10px;
    font-weight: bold;
}

.detail-info form input[type="number"] {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 60px;
}

/* 个人信息、注册、登录页面通用样式 */
.user-info-container {
    max-width: 600px;
    margin: 50px auto;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #ccc;
}

.user-info-header {
    background-color: #4A90E2; /* 蓝色背景 */
    color: white;
    padding: 15px 20px;
    text-align: center;
    font-size: 1.5em;
    font-weight: bold;
}

.user-info-header h2 {
    margin: 0;
    padding: 0;
}

.user-info-container form {
    padding: 30px;
}

.form-group {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.form-group label {
    flex: 0 0 80px; /* 固定标签宽度 */
    margin-right: 15px;
    font-weight: bold;
    color: #555;
}

.form-control {
    flex: 1; /* 输入框占据剩余空间 */
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: #4A90E2;
    box-shadow: 0 0 5px rgba(74, 144, 226, 0.5);
}

.form-control[readonly] {
    background-color: #f0f0f0;
    cursor: not-allowed;
}

.form-actions {
    text-align: center;
    margin-top: 30px;
}

.btn {
    padding: 10px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.1s ease;
    margin: 0 10px;
}

.btn-success {
    background-color: #5cb85c; /* 绿色 */
    color: white;
}

.btn-success:hover {
    background-color: #4cae4c;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #6c757d; /* 灰色 */
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
}

.form-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 登录/注册页面的特定样式调整 */
.form-group-inline {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.form-group-inline label {
    flex: 0 0 80px; /* 固定标签宽度 */
    margin-right: 15px;
    font-weight: bold;
    color: #555;
}

.form-control-inline {
    flex: 1; /* 输入框占据剩余空间 */
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control-inline:focus {
    border-color: #4A90E2;
    box-shadow: 0 0 5px rgba(74, 144, 226, 0.5);
}

.captcha-placeholder {
    width: 100px; /* 验证码图片宽度 */
    height: 40px;
    background-color: #e0e0e0; /* 占位背景色 */
    border: 1px solid #ccc;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1em;
    color: #666;
    margin-left: 10px;
    margin-right: 10px;
    cursor: pointer; /* 模拟点击刷新 */
}

.refresh-captcha {
    color: #007bff;
    text-decoration: none;
    font-size: 0.9em;
    white-space: nowrap;
}

.refresh-captcha:hover {
    text-decoration: underline;
}

/* 兼容旧的 .auth-form 样式，如果还有其他地方在使用 */
/* 注意：由于现在使用 user-info-container 结构，auth-form 可能不再需要 */
/* 如果 auth-form 仍然在其他地方使用，可以保留这些样式并调整 */
.auth-form {
    max-width: 400px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.auth-form h2 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"] {
    width: calc(100% - 20px); /* 减去padding */
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.auth-form button[type="submit"],
.auth-form button[type="reset"] {
    width: auto;
    padding: 10px 20px;
    margin-right: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
}

.auth-form button[type="submit"] {
    background-color: #007bff;
    color: white;
}

.auth-form button[type="reset"] {
    background-color: #6c757d;
    color: white;
}

.auth-form button:hover {
    opacity: 0.9;
}

.user-info p {
    margin-bottom: 10px;
}

.footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 20px;
    position: relative;
    bottom: 0;
    width: 100%;
    box-sizing: border-box;
}

/* 轮播图样式 */
.slider-container {
    position: relative;
    width: 100%;
    max-width: none;
    height: 350px;
    margin: 0 auto 0 auto !important;
    overflow: hidden;
    border-radius: 0;
    box-shadow: none;
}

.slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: fill;
    top: 0;
    left: 0;
    opacity: 0; /* 默认隐藏 */
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out; /* 动画过渡 */
    z-index: 1; /* 默认层级 */
}

.slide.active {
    opacity: 1;
    transform: translateX(0); /* 活跃图片最终位置 */
    z-index: 2; /* 活跃图片置于顶层 */
}

/* 进入动画 */
.slide.enter-right {
    transform: translateX(100%); /* 从右侧开始 */
}
.slide.enter-left {
    transform: translateX(-100%); /* 从左侧开始 */
}

/* 离开动画 */
.slide.leave-left {
    transform: translateX(-100%); /* 离开到左侧 */
    opacity: 0;
    z-index: 1;
}
.slide.leave-right {
    transform: translateX(100%); /* 离开到右侧 */
    opacity: 0;
    z-index: 1;
}

/* 临时禁用过渡，用于瞬间定位 */
.slide.no-transition {
    transition: none !important;
}

.navigation-arrows {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0;
    box-sizing: border-box;
    z-index: 10;
}

.prev-arrow, .next-arrow {
    cursor: pointer;
    color: rgba(255, 255, 255, 0.8);
    font-size: 3.5em;
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    transition: color 0.3s ease;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.prev-arrow:hover, .next-arrow:hover {
    color: #fff;
}

.pagination-dots {
    position: absolute;
    bottom: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 10;
}

.dot {
    cursor: pointer;
    height: 10px;
    width: 10px;
    margin: 0 5px;
    background-color: rgba(0, 0, 0, 0.5); /* 指示点背景色黑色半透明 */
    border: 1px solid rgba(0, 0, 0, 0.8); /* 黑色边框 */
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.dot.active {
    background-color: #000; /* 活动指示点纯黑色 */
    border-color: #000; /* 活动指示点边框纯黑色 */
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 250px; /* Increased width to accommodate content */
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 100; /* Adjusted to be higher than slider-container */
    border-radius: 5px;
    padding: 15px;
    line-height: 1.5;
    right: -50px; /* Adjusted to move significantly left */
}

.dropdown-content a {
    color: black;
    padding: 8px 15px;
    text-decoration: none;
    display: block;
    text-align: left;
    white-space: normal;
}

.dropdown-content p {
    color: black;
    padding: 8px 15px;
    text-align: left;
    font-size: 0.9em;
    line-height: 1.4;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* 购物车表格样式 */
.cart-table {
    width: 100%;
    border-collapse: collapse; /* 合并边框 */
    margin-top: 20px;
    background-color: #fff;
    border-radius: 8px; /* 圆角 */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* 阴影 */
    overflow: hidden; /* 确保圆角和阴影生效 */
}

.cart-table th,
.cart-table td {
    border: 1px solid #ddd; /* 单元格边框 */
    padding: 12px 15px;
    text-align: left;
    vertical-align: middle; /* 垂直居中 */
}

.cart-table thead th {
    background-color: #4A90E2; /* 蓝色背景 */
    color: white;
    font-weight: bold;
}

.cart-table tbody tr:nth-child(even) {
    background-color: #f9f9f9; /* 斑马条纹 */
}

.cart-table tbody tr:hover {
    background-color: #f1f1f1; /* 悬停效果 */
}

.cart-table img {
    width: 80px;
    height: 80px;
    object-fit: cover; /* 裁剪以填充，保持比例 */
    border-radius: 4px;
}

/* 数量控制 */
.quantity-controls {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow: hidden;
    width: fit-content; /* 让容器宽度适应内容 */
}

.quantity-input {
    width: 50px; /* 调整输入框宽度 */
    padding: 8px 5px;
    border: none;
    text-align: center;
    -moz-appearance: textfield; /* 隐藏 Firefox 的默认上下箭头 */
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none; /* 隐藏 Chrome/Safari 的默认上下箭头 */
    margin: 0;
}

.quantity-btn {
    background-color: #f0f0f0; /* 按钮背景色 */
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1em;
    color: #555;
    transition: background-color 0.2s ease;
}

.quantity-btn:hover {
    background-color: #e0e0e0;
    color: #333;
}

.minus-btn {
    border-right: 1px solid #ccc;
}

.plus-btn {
    border-left: 1px solid #ccc;
}

/* 购物车内的更新和删除按钮 */
.cart-table button.update-quantity-btn {
    background-color: #007bff; /* 更新按钮 */
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    margin-left: 10px; /* 与数量控制的间距 */
    white-space: nowrap;
}

.cart-table button.update-quantity-btn:hover {
    background-color: #0056b3;
}

.cart-table button.remove-item-btn {
    background-color: #dc3545; /* 删除按钮使用红色 */
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    white-space: nowrap;
}

.cart-table button.remove-item-btn:hover {
    background-color: #c82333;
}

/* 购物车按钮样式 */
#clearCartBtn,
.cart-checkout-btn {
    background-color: #ffffff; /* 白色背景 */
    color: #333; /* 深色文字 */
    border: 1px solid #d0d0d0; /* 浅灰色边框 */
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

#clearCartBtn:hover,
.cart-checkout-btn:hover {
    background-color: #f5f5f5;
    border-color: #a0a0a0;
}

/* 购物车 summary 区域 */
.cart-summary {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px; /* 调整按钮和总金额之间的间距 */
    margin-top: 20px;
    padding: 15px 0;
}

.cart-summary p {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    margin: 0; /* 移除默认外边距 */
}

.cart-summary p span {
    color: #ff4500; /* 红色用于总金额 */
}

.cart-summary form {
    margin: 0; /* 移除表单的默认外边距 */
    display: inline-block; /* 让表单内容水平排列 */
}

/* 订单卡片样式 */
.order-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    background-color: #f9f9f9;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.order-card h3 {
    margin-top: 0;
    color: #007bff;
    font-size: 1.5em;
    margin-bottom: 15px;
}

.order-card p {
    margin-bottom: 8px;
    color: #555;
}

.order-card h4 {
    margin-top: 25px;
    margin-bottom: 10px;
    color: #333;
    font-size: 1.2em;
}

/* 订单详情表格样式 (与购物车表格类似) */
.order-detail-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.order-detail-table th,
.order-detail-table td {
    border: 1px solid #eee;
    padding: 10px 15px;
    text-align: left;
    vertical-align: middle;
}

.order-detail-table thead th {
    background-color: #4A90E2;
    color: white;
    font-weight: bold;
}

.order-detail-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.order-detail-table tbody tr:hover {
    background-color: #f1f1f1;
}

.order-detail-table img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 10px;
    vertical-align: middle;
}

.order-detail-table td span {
    vertical-align: middle;
}

/* 订单状态颜色 */
.order-card p span[th\:text^="已完成"] {
    color: #28a745; /* 绿色 */
    font-weight: bold;
}

.order-card p span[th\:text^="待支付"] {
    color: #ffc107; /* 橙色 */
    font-weight: bold;
}

/* 订单详情页面样式 */
.checkout-container {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.order-summary {
    flex: 2;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.shipping-info {
    flex: 1;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.checkout-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    border: 1px solid #ddd; /* 外边框 */
    border-radius: 8px;
    overflow: hidden; /* 确保圆角可见 */
}

.checkout-table th,
.checkout-table td {
    padding: 12px 15px;
    text-align: left;
    border: 1px solid #eee; /* 内边框 */
}

.checkout-table thead th {
    background-color: #4A90E2; /* 蓝色背景 */
    color: white;
    font-weight: bold;
    border-bottom: 1px solid #4A90E2;
}

.checkout-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.checkout-table tbody tr:hover {
    background-color: #f1f1f1;
}

.checkout-table img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 10px;
    vertical-align: middle;
}

.order-total {
    margin-top: 20px;
    padding: 15px;
    border-top: 1px solid #eee;
    text-align: right;
}

.order-total p {
    margin: 0;
    font-size: 1.1em;
    font-weight: bold;
    color: red;
}

.shipping-form {
    margin-top: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
}

.form-group textarea {
    height: 100px;
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    justify-content: center; /* 居中按钮组 */
}

.back-btn {
    padding: 12px 25px;
    background-color: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.back-btn:hover {
    background-color: #5a6268;
}

.submit-order-button {
    padding: 0;
    background-color: transparent; /* 移除背景色 */
    color: #007bff; /* 蓝色文本 */
    border: none;
    cursor: pointer;
    font-size: 1.1em;
    transition: color 0.3s, text-decoration 0.3s; /* 过渡效果 */
    text-decoration: none; /* 默认无下划线 */
}

.submit-order-button:hover {
    background-color: transparent;
    color: #0056b3; /* 鼠标悬停时颜色变深 */
    text-decoration: underline; /* 鼠标悬停时显示下划线 */
}

/* 订单详情页面动作按钮样式 */
.checkout-actions {
    display: flex;
    gap: 15px; /* 按钮之间的间距 */
}

.checkout-actions .btn.btn-secondary {
    padding: 12px 25px;
    background-color: #6c757d; /* 灰色 */
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1.1em;
}

.checkout-actions .btn.btn-secondary:hover {
    background-color: #5a6268;
}

.submit-order-button {
    padding: 12px 25px;
    background-color: #007bff; /* 蓝色 */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.3s;
    text-decoration: none; /* 移除下划线 */
}

.submit-order-button:hover {
    background-color: #0056b3;
}

/* 订单详情页面总览底部样式 (包含总金额和按钮组) */
.order-summary-footer {
    display: flex;
    flex-direction: column; /* 使子元素垂直堆叠 */
    align-items: flex-end; /* 使子元素右对齐 */
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.order-total {
    margin-bottom: 15px; /* 与按钮组的间距 */
    padding: 0;
    text-align: right;
    background-color: transparent; /* 确保背景透明 */
}

.order-total p {
    margin: 0;
    font-size: 1.1em;
    font-weight: bold;
    color: red;
}

.order-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.checkout-back-btn,
.checkout-submit-btn {
    padding: 12px 25px;
    background-color: white;
    color: #333;
    border: 1px solid #e0e0e0; /* 调整边框颜色 */
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.checkout-back-btn:hover,
.checkout-submit-btn:hover {
    background-color: #f0f0f0;
    border-color: #c0c0c0;
}

.order-buttons form {
    display: inline-block;
    margin-top: 0;
}

/* 订单详情页面主卡片样式 */
.order-details-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin: 20px auto;
    max-width: 1200px; /* 保持与main-content一致的最大宽度 */
}

/* 订单提交成功页面样式 */
.order-success-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    padding-bottom: 20px; /* 增加底部内边距 */
    margin: 20px auto; /* 居中显示 */
    max-width: 600px; /* 限制最大宽度 */
    text-align: center;
}

.order-success-card h2 {
    background-color: #4A90E2; /* 蓝色背景 */
    color: white;
    padding: 15px 0; /* 增加内边距 */
    margin-top: 0; /* 移除顶部外边距 */
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    font-size: 1.5em;
    text-align: center;
}

.order-success-card p {
    margin: 20px 0;
    font-size: 1.1em;
    color: #333;
}

.order-success-card .order-id {
    color: red;
    font-weight: bold;
}

.order-success-card .btn-payment {
    display: inline-block;
    color: #007bff; /* 蓝色文本 */
    text-decoration: none; /* 移除下划线 */
    font-size: 1.1em;
    transition: color 0.3s, text-decoration 0.3s;
    margin-top: 10px;
}

.order-success-card .btn-payment:hover {
    color: #0056b3; /* 鼠标悬停时颜色变深 */
    text-decoration: underline; /* 鼠标悬停时显示下划线 */
}

/* 模态框样式 */
.modal {
    display: none; /* 默认隐藏 */
    position: fixed; /* 固定定位 */
    z-index: 1000; /* 确保在最上层 */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* 允许滚动 */
    background-color: rgba(0, 0, 0, 0.4); /* 半透明黑色背景 */
    /* display: flex; /* 移除此行，只在JS中控制显示为flex */
    align-items: center; /* 垂直居中 */
    justify-content: center; /* 水平居中 */
}

.modal-content {
    background-color: #fefefe;
    margin: auto; /* 自动外边距用于居中（如果不是flexbox） */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* 模态框宽度 */
    max-width: 500px; /* 最大宽度 */
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* 阴影效果 */
    position: relative; /* 允许内部元素绝对定位 */
    text-align: center;
}

.modal-content h3 {
    color: #007bff;
    margin-top: 0;
    margin-bottom: 15px;
}

.modal-content p {
    margin-bottom: 10px;
    font-size: 1.1em;
}

.modal-content strong {
    color: red;
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.modal-content .btn {
    display: inline-block;
    padding: 10px 20px;
    margin: 5px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.modal-content .btn-primary {
    background-color: #007bff;
    color: white;
    border: none;
}

.modal-content .btn-primary:hover {
    background-color: #0056b3;
}

.modal-content .btn-secondary {
    background-color: #6c757d;
    color: white;
    border: none;
}

.modal-content .btn-secondary:hover {
    background-color: #5a6268;
}

/* 订单列表页面样式 */
.order-list-container {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-top: 20px;
}

.order-list-table,
.order-detail-goods-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.order-list-table th,
.order-list-table td,
.order-detail-goods-table th,
.order-detail-goods-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.order-list-table thead th,
.order-detail-goods-table thead th {
    background-color: #4A90E2; /* 蓝色背景 */
    color: white;
    font-weight: bold;
}

.order-list-table tbody tr:nth-child(even),
.order-detail-goods-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.order-list-table tbody tr:hover,
.order-detail-goods-table tbody tr:hover {
    background-color: #f1f1f1;
}

/* 订单详情页面样式 */
.order-details-card {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-top: 20px;
}

.order-details-card h3,
.order-details-card h4 {
    color: #333;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.order-details-card p {
    margin-bottom: 8px;
    line-height: 1.6;
}

.order-details-card p span {
    font-weight: bold;
    color: #555;
}

.pay-now-link {
    color: #007bff; /* 蓝色 */
    text-decoration: none;
    margin-left: 10px;
    font-weight: bold;
}

.pay-now-link:hover {
    text-decoration: underline;
}

.btn.btn-info.btn-sm {
    background-color: #17a2b8; /* 浅蓝色 */
    color: white;
    border: 1px solid #17a2b8;
    padding: 5px 10px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    font-size: 0.9em;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.btn.btn-info.btn-sm:hover {
    background-color: #138496;
    border-color: #138496;
}

.back-to-orders {
    text-align: right;
    margin-top: 20px;
}

.back-to-orders .btn.btn-secondary {
    background-color: #6c757d; /* 灰色 */
    color: white;
    border: 1px solid #6c757d;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.back-to-orders .btn.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #5a6268;
}

/* 订单详情页按钮区域样式 */
.order-detail-actions {
    display: flex;
    justify-content: flex-end; /* 按钮靠右对齐 */
    gap: 10px; /* 按钮之间间距 */
    margin-top: 20px;
}

.order-detail-actions .btn.btn-primary {
    background-color: #007bff; /* 蓝色 */
    color: white;
    border: 1px solid #007bff;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.order-detail-actions .btn.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.order-detail-actions .btn.btn-secondary {
    background-color: #6c757d; /* 灰色 */
    color: white;
    border: 1px solid #6c757d;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.order-detail-actions .btn.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #5a6268;
}

/* 分类筛选样式 */
.category-filter {
    background-color: #f8f8f8;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.category-filter h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.2em;
}

.category-filter ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-filter li {
    margin: 0;
}

.category-filter a {
    display: inline-block;
    padding: 8px 15px;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
    background-color: #fff;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}

.category-filter a:hover {
    background-color: #f0f0f0;
    border-color: #ccc;
}

.category-filter a.active {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
} 